package com.bt7274.pojo.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;

/*
 * 创建促销活动BO
 */
@Data
public class PromotionBO {

    @NotBlank(message = "活动类型不能为空")
    private String type;

    @NotBlank(message = "活动标题不能为空")
    private String title;

    private String description;

    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    private Integer isActive = 1; // 默认生效
}